home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / Documentation / Development Notes / FWBuild & ODFRC Tools / FWBuild Overview (2⁄2) < prev    next >
Encoding:
Text File  |  1996-09-17  |  12.0 KB  |  268 lines  |  [TEXT/ttxt]

  1. OpenDoc
  2. Development
  3. Framework
  4.                                                                                                                                                                                      
  5. FWBuild Overview (2/2)
  6. ODF Release 2                                                                                                                                                            
  7.  
  8.  
  9. FWTool Reference
  10.  
  11. FWTool supports many command line options.  One command line option, “-help”, outputs a summary of all command line options.  For example, executing the command
  12.  
  13. FWTool -help
  14.  
  15. results in the following output:
  16.  
  17. FWBuild, The Framework Build Processor
  18. Version: 1.1f2 (MacOS) Mar 27 1996
  19. © Apple Computer, Inc. 1993-1996
  20.  
  21. Usage: FWBuild [ options ] target[s]
  22.  Options:
  23.     -xxx    Use build suite xxx (see bldsuite.txt)
  24.     -o xxx    Send output to filename xxx
  25.     -Echo xxx    Use Echo Tool xxx
  26.     -Make    xxx    Use Make Tool xxx
  27.     -Asm xxx    Use Assembler xxx
  28.     -C xxx    Use C Compiler xxx
  29.     -Cpp xxx    Use C++ Compiler xxx
  30.     -Link    xxx    Use Linker xxx
  31.     -Lib xxx    Use Librarian xxx
  32.     -ODFRC xxx    Use ODFRC tool xxx
  33.     -RC xxx    Use Resource Compiler xxx
  34.     -EchoOptions xxx    Specify options xxx to the Echo Tool
  35.     -MakeOptions xxx    Specify options xxx to the Make Tool
  36.     -AsmOptions    xxx    Specify options xxx to the Assembler
  37.     -COptions    xxx    Specify options xxx to the C Compiler
  38.     -CppOptions xxx    Specify options xxx to the C++ Compiler
  39.     -LinkOptions    xxx    Specify options xxx to the Linker
  40.     -LibOptions xxx    Specify options xxx to the Librarian
  41.     -ODFRCOptions xxx    Specify options xxx to the ODFRC Tool
  42.     -RCOptions xxx    Specify options xxx to the Resource Compiler
  43.     -D xxx    Define a macro xxx for all tools
  44.     -Progress    Display progress (default)
  45.     -NoProgress    Don't display progress
  46.     -E    Build everything = TRUE
  47.     -PCH    Use precompiled headers = TRUE
  48.     -NoPCH    Don't use precompiled headers (default)
  49.     -Times    Track build times
  50.     -NoTimes    Don't track times (default)
  51.     -Separate    Place object files in separate build directories
  52.     -NoSeparate    Don't place object files in separate build directories (default)
  53.     -Fail    Stop on failure (default)
  54.     -NoFail    Don't stop on failure (attempt to build all dependents)
  55.     -AutoBuild    Automatically build Auto-targets
  56.     -NoAutoBuild    Don't automatically build Auto-targets (default)
  57.     -Debug    Define debug macros for build (default)
  58.     -NoDebug    Don't define debug macros for build
  59.     -Sym    Generate symbolic debugging information (default)
  60.     -NoSym    Don't generate symbolic debugging information
  61.     -000    Generate 68000 code (default for 68K)
  62.     -020    Generate 68020 code (68K only!)
  63.     -030    Generate 68030 code (68K only!)
  64.     -040    Generate 68040 code (68K only!)
  65.     -PPC    Generate PPC code (PPC only!)
  66.     -modelNear    Use near memory model (default for 68K)
  67.     -modelFar    Use far memory model (68K only!)
  68.     -modelCFMSeg    Use CFM segmented memory model (68K only!)
  69.     -modelCFMFlat    Use CFM flat memory model (68K only!)
  70.     -F    Specify a specific make file to use 
  71.     -List    Generate preprocessed source listings during compile
  72.     -NoList    Don't generate preprocessed source listings during compile (default)
  73.     -Deps    Include object files dependencies in make sequence (default)
  74.     -NoDeps    Don't include object files dependencies in make sequence
  75.     -Help    Show usage
  76.     -??    Show usage
  77.  
  78. Clearly, FWTool recognizes a large number of options.  Many of these options are related, and will be discussed below in logical groups.
  79.  
  80. NOTE: Some of these options are obsolete and will be removed in a future release.  They may not work in this release.  These options are marked OBSOLETE below.  Other options are not currently supported fully, though we intend to support them in a future release.  These options are marked UNSUPPORTED.  See also the Future Directions section below.
  81.  
  82. Build Suite Specification
  83.  
  84.  -xxx  Use build suite xxx (see bldsuite.txt)
  85.  
  86. Any string of characters following a hyphen (‘-’) that is not recognized as a specific option is considered to be the name of a build suite.  If the build suite name appears in BldSuite.txt, then the option is considered a specification of the build suite to be used for this build.  If no build suite is specified, then FWBuild defaults to the first build suite defined in BldSuite.txt.
  87.  
  88. Output File Specification
  89.  
  90.  -o xxx  Send output to filename xxx
  91.  
  92. The -o option is used to specify the output of FWTool.  The script FWBuild uses this option to direct the output to the file “{FWTempDir}FWBuild.tmp”, so normally this option would not be specified on the FWBuild command line.
  93.  
  94. Tool Overrides
  95.  
  96.  -Echo xxx Use Echo Tool xxx
  97.  -Make xxx Use Make Tool xxx
  98.  -Asm xxx Use Assembler xxx
  99.  -C xxx  Use C Compiler xxx
  100.  -Cpp xxx Use C++ Compiler xxx
  101.  -Link xxx Use Linker xxx
  102.  -Lib xxx Use Librarian xxx
  103.  -ODFRC xxx Use ODFRC tool xxx
  104.  -RC xxx  Use Resource Compiler xxx
  105.  
  106. Each of the above options can be used to override a specific tool of a build suite.  These options are sometimes useful when several vendors provide compatible tools, and one wants to switch out a individual tool for a given suite without defining a new suite.  However, it is generally safer (in a configuration management sense) to define a new suite.
  107.  
  108. Tool Options
  109.  
  110.  -EchoOptions xxx Specify options xxx to the Echo Tool
  111.  -MakeOptions xxx Specify options xxx to the Make Tool
  112.  -AsmOptions xxx Specify options xxx to the Assembler
  113.  -COptions xxx Specify options xxx to the C Compiler
  114.  -CppOptions xxx Specify options xxx to the C++ Compiler
  115.  -LinkOptions xxx Specify options xxx to the Linker
  116.  -LibOptions xxx Specify options xxx to the Librarian
  117.  -ODFRCOptions xxx Specify options xxx to the ODFRC Tool
  118.  -RCOptions xxx  Specify options xxx to the Resource Compiler
  119.  
  120. Each of the above options can be used to specify options that will be passed to a specific tool.  For example, one might do the following
  121.  
  122.  FWBuild -CppOptions '-D qSpecialDebugging=1' ...
  123.  
  124. This would append the string ‘-D qSpecialDebugging=1’ to every C++ command line in the current build.  Note that FWBuild does not change the target build directories used when you specify tool command line options this way, so using this option requires that you consider the impact on configuration management (e.g. do you need to do a full rebuild so that all C++ files are recompiled with this flag defined?).
  125.  
  126. Global Macro Definitions   (UNSUPPORTED)
  127.  
  128.  -D xxx  Define a macro xxx for all tools
  129.  -U xxx  Undefine a macro xxx for all tools
  130.  
  131. This option will define a symbol for every MPW tool invoked (including Make itself) as if a #define was in the source code.
  132.  
  133. FWTool Progress
  134.  
  135.  -Progress Display progress
  136.  -NoProgress Don't display progress
  137.  
  138. These options control whether FWTool outputs additional progress information.  By default no progress information is output.
  139.  
  140. Build All Option
  141.  
  142.  -E  Build everything = TRUE
  143.  
  144. This option will force a full rebuild.
  145.  
  146. Precompiled Header Options  (UNSUPPORTED)
  147.  
  148.  -PCH  Use precompiled headers = TRUE
  149.  -NoPCH  Don't use precompiled headers
  150.  
  151. These options control whether precompiled headers are built and used.
  152.  
  153. NOTE: These options are currently not supported, but we plan to support them in a future release.  They aren’t needed for CodeWarrior builds.
  154.  
  155. Build Time Options 
  156.  
  157.  -Times  Track build times
  158.  -NoTimes Don't track times
  159.  
  160. These options control whether FWBuild inserts commands to track the time required to complete a build.
  161.  
  162. Alignment Options  (OBSOLETE)
  163.  
  164.  -Align  Align code and data to 16 bit boundaries
  165.  -NoAlign Don't align code and data to 16 bit boundaries
  166.  
  167. These options specify data alignment.
  168.  
  169. Separate Build Target Directories Options
  170.  
  171.  -Separate Place object files in separate build directories
  172.  -NoSeparate Don't place object files in separate build directories
  173.  
  174. These options specify whether FWBuild separates all build targets into separate build target directories.  The default is -NoSeparate, and results in the use of target directories as described in the section “Build Target Directories” above.
  175.  
  176. Run Options  (OBSOLETE)
  177.  
  178.  -Run  Run the target after successful build
  179.  -NoRun  Don't run the target after successful build
  180.  
  181. These options specify whether the final build target is executed after it is successfully built.  The default is -NoRun.
  182.  
  183. Fail Options  (UNSUPPORTED)
  184.  
  185.  -Fail  Stop on failure
  186.  -NoFail  Don't stop on failure (attempt to build all dependents)
  187.  
  188. These options specify whether the build continues after errors are encountered.  The default is -Fail.
  189.  
  190. Autobuild Options
  191.  
  192.  -AutoBuild Automatically build Auto-targets
  193.  -NoAutoBuild Don't automatically build Auto-targets
  194.  
  195. These options specify whether FWBuild attempts to bring the entire system up-to-date.  The default is -NoAutoBuild.  Specifying -AutoBuild causes FWBuild to also build all targets specified in the file {FWToolsDir}autotarg.txt.
  196.  
  197. Debug Options 
  198.  
  199.  -Debug  Define debug macros for build
  200.  -NoDebug Don't define debug macros for build
  201.  
  202. These options specify whether FWBuild defines an ODF-Specific preprocessor symbol (FW_DEBUG) for code that is to be compiled in debug-only builds.  The default is -Debug.
  203.  
  204. Symbolic Information Options  (UNSUPPORTED)
  205.  
  206.  -Sym  Generate symbolic debugging information
  207.  -NoSym  Don't generate symbolic debugging information
  208.  
  209. These options control whether final build targets will contain symbolic debugging information.  The default is -Sym.
  210.  
  211. Code Generation  (UNSUPPORTED)
  212.  
  213.  -000  Generate 68000 code
  214.  -020  Generate 68020 code
  215.  -030  Generate 68030 code
  216.  -040  Generate 68040 code
  217.  -PPC  Generate PowerPC code
  218.  
  219. These options specify the type of code generation.
  220.  
  221. Runtime Model Options
  222.  
  223.  -modelNear Use near memory model
  224.  -modelFar Use far memory model
  225.     -modelCFMSeg    Use CFM segmented memory model (68K only!)
  226.     -modelCFMFlat    Use CFM flat memory model (68K only!)
  227.  
  228.  
  229. These options specify the runtime model.  The options are all ignored for PowerPC builds.
  230.  
  231. Makefile options
  232.  
  233.  -F  Specify a specific make file to use 
  234.  -Pre  Specify an additional pre-makefile
  235.  -Post  Specify an additional post-makefile
  236.  
  237. The -f option specifies a makefile to use instead of MacMake.bmk.  The -Pre and -Post options specify makefiles that will be processed respectively just before and just after the MacMake.bmk file (or if the -f option is used, the Makefile specified by that option).
  238.  
  239. List Options  (OBSOLETE)
  240.  
  241.  -List  Generate preprocessed source listings during compile
  242.  -NoList  Don't generate preprocessed source listings during compile
  243.  
  244. These options specify whether preprocessor listings are created during source compiles.
  245.  
  246. Dependency Options  (UNSUPPORTED)
  247.  
  248.  -Deps  Include object file dependencies in make sequence
  249.  -NoDeps  Don't include object file dependencies in make sequence
  250.  
  251. These options specify whether the MacMake.dep files are used or not.  The default is -Deps.
  252.  
  253. Help Options
  254.  
  255.  -Help  Show usage
  256.  -??  Show usage
  257.  
  258. These options specify whether FWBuild emits the usage message.
  259.  
  260.  
  261. Known Limitations and Future Directions
  262.  
  263. FWBuild was inspired by MacApp’s MABuild.  It has been in use for more than two years, being maintained on an as-needed basis.  Future changes will all be focused on making it possible to extend FWBuild to support changing and adding build environments without recompiling FWTool.  This will require moving some hard-coded information from within FWTool to be specified in the various configuration files (BldSuite.txt, BldTools.txt, etc.).  With this approach, it will probably be necessary to define additional suites instead of using command line options.  For example, in the past FWTool understood the concept of “debug” vs. “non-debug” builds, and knew how this option affected the various tools used to create a build.  Unfortunately, this meant that FWTool had to be modified to support building with a new compiler.
  264.  
  265. As command line compiler environments, such as MPW, seem to be rapidly being replaced by all-in-one, stand-alone IDE systems such as Symantec C++,  Metrowerks CodeWarrior, and Microsoft's Visual C++, we expect FWBuild to eventually be phased out.  We will concentrate our efforts around automating builds using AppleScript and IDE's rather than revising FWBuild.  It would seem that the direction that tools have taken have made some of the advantages of FWBuild unnecessary.
  266.  
  267. © 1993 - 1996 Apple Computer, Inc. All right reserved.
  268. Apple, the Apple Logo, Macintosh, and OpenDoc are trademarks of Apple Computer, Inc., registered in the United States and other countries.